open(BUFF,"input_file")or die "no file found\n";
#$line=<BUFF>;
while($line=<BUFF>)
{
	chomp($line);
	if($line =~   m/^#/)
	{
	@arr = split("\t",$line);
	open(BUFF1,"samtools2bed_subset.csh") or die "no file found\n";
	#open(BUFF1,"mergeVCF.csh") or die "no file found\n";
	@file = ();
	@file = <BUFF1>;
	$file = join("\n",@file);
	$file =~ s/\n\n/\n/g;
	@file = ();
	@file = split('XYX',$file);
	$file = $file[0].$arr[0].$file[1].$arr[1].$file[2];
	open(WRBUFF,">Arrayjob_$arr[1].csh") or die "not able to write\n";
	print WRBUFF $file."\n";
	#system("qsub Arrayjob_$arr[1].csh");
	print "dealing with Arrayjob_$arr[1].csh\n";
	#system("sh Arrayjob_$arr[1].csh");
	}
}
